package com.marmot.cloud.framework.core.constant;

public enum C implements ResultCode {
    SUCCESS(200, "业务执行成功"),
    FAILURE(400, "业务执行失败"),
    ERROR(500, "业务执行异常"),
    UN_AUTHORIZED(401, "请求未授权"),
    PASSWORD_ERROR(401, "密码验证错误"),
    NOT_FOUND(404, "没找到请求"),
    MSG_NOT_READABLE(400, "消息不能读取"),
    METHOD_NOT_SUPPORTED(405, "不支持当前请求方法"),
    MEDIA_TYPE_NOT_SUPPORTED(415, "不支持当前媒体类型"),
    REQ_REJECT(403, "请求被拒绝"),
    INTERNAL_SERVER_ERROR(500, "服务内部异常"),

    JWT_EXPIRED(400, "Token令牌超时"),

    PARAM_MISS(400, "缺少必要的请求参数"),
    PARAM_TYPE_ERROR(400, "请求参数类型错误"),
    PARAM_BIND_ERROR(400, "请求参数绑定错误"),
    PARAM_VALID_ERROR(400, "参数校验失败");


    final Integer code;
    final String msg;

    C(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public Integer getResultCode() {
        return this.code;
    }

    @Override
    public String getResultMsg() {
        return this.msg;
    }

}